import request from "@/utils/request";

/**
 * 财务数据统计接口
 * @returns {Promise<unknown>}
 */
export function getFinanceStatistics(){
  return request({
    url: '/admin/income/getAdminIndexStatistics',
    method: 'get',
  })
}

/**
 * 翻译人员的数据统计接口
 * @returns {Promise<unknown>}
 */
export function getTranslatorIncomeStatistics(){
  return request({
    url: '/translate/income/getTranslatorStatistics',
    method: 'get',
  })
}

export function confirmIncome(incomeId){
  return request({
    url: '/admin/income/confirmIncome',
    method: 'post',
    data:{
      id : incomeId
    }
  })
}

/**
 * 获取翻译的收益列表数据
 * @param params
 * @returns {Promise<unknown>}
 */
export function getTranslatorIncomeList(params = {}){
  return request({
    url: '/translate/income/getTranslatorIncomeList',
    method: 'get',
    params
  })
}

/**
 * 获取翻译人员本月预估收益
 * @returns {Promise | Promise<unknown>}
 */
export function getTranslatorPredictIncome(){
  return request({
    url: '/translate/income/getTranslatorPredictIncome',
    method: 'get',
  })
}

/**
 * 获取翻译人员的收入明细
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export function getTranslatorIncomeDetailList(params = {}){
  return request({
    url: '/translate/income/getTranslatorIncomeDetail',
    method: 'get',
    params,
  })
}
